package lambda;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class LambdaListDemo {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("112");
        list.add("145612");
        list.add("112254225");
        list.add("114242");

        list.sort(Comparator.comparingInt(String::length));
        System.out.println(list);
    }
}
